﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_RedundancyGroup class represents a collection of managed system elements, which indicates that the aggregated components, together, provide redundancy. All elements aggregated in a redundancy group should be instantiations of the same object class.
    /// </summary>
    public class CIM_RedundancyGroup : CIM_LogicalElement
    {

        private string _CreationClassName;
        private Nullable<UInt16> _RedundancyStatus;

        /// <summary>
        /// Name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified.
        /// </summary>
        public string CreationClassName { get { return _CreationClassName; } }

        /// <summary>
        /// Information about the state of the redundancy group.
        /// </summary>
        public Nullable<UInt16> RedundancyStatus { get { return _RedundancyStatus; } } //TODO enum


        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_RedundancyGroup(ManagementBaseObject mbo)
            :base(mbo)
        {
            _CreationClassName = mbo.GetStringValue("CreationClassName");
            _RedundancyStatus = mbo.GetUshortValue("RedundancyStatus");
        }

    }
}
